package com.yingxin.yxerp.module.attachment.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.util.Date;

/**
 * 附件关系表
 * @author jiangxudong
 * @since 2022-03-28
 */

@Data
@TableName("t_attachment_relation")
public class AttachmentRelation {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private String id;

    /**
     * 附件id
     */
    private String attachmentId;

    /**
     * 业务 id
     */
    private String businessId;

    /**
     * 业务类型
     */
    private String businessType;

    /**
     * 业务属性
     */
    private String businessAttr;

    /**
     * 备注
     */
    private String remarks;

    /**
     * 创建者id
     */
    @TableField(fill = FieldFill.INSERT)
    private String creatorId;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新者id
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private String updaterId;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.UPDATE)
    private Date updateTime;

    /**
     * 删除标记：0 正常 1 已删除
     */
    @TableLogic
    private String delFlag;

    public AttachmentRelation() {
    }

    public AttachmentRelation(String attachmentId, String businessId, String businessType, String businessAttr) {
        this.attachmentId = attachmentId;
        this.businessId = businessId;
        this.businessType = businessType;
        this.businessAttr = businessAttr;
    }
}
